<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Protocols  Reference</title>
    <link rel="stylesheet" type="text/css" href="css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="css/highlight.css" />
    <meta charset='utf-8'>
    <script src="js/jquery.min.js" defer></script>
    <script src="js/jazzy.js" defer></script>
    
    <script src="js/lunr.min.js" defer></script>
    <script src="js/typeahead.jquery.js" defer></script>
    <script src="js/jazzy.search.js" defer></script>
  </head>
  <body>
    <a name="//apple_ref/swift/Section/Protocols" class="dashAnchor"></a>
    <a title="Protocols  Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="index.html">RxBluetoothKit 7.0.0 Docs</a> (82% documented)</p>
        <p class="header-right"><a href="https://github.com/Polidea/RxBluetoothKit"><img src="img/gh.png"/>View on GitHub</a></p>
        <p class="header-right">
          <form role="search" action="search.json">
            <input type="text" placeholder="Search documentation" data-typeahead>
          </form>
        </p>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="index.html">RxBluetoothKit Reference</a>
        <img id="carat" src="img/carat.png" />
        Protocols  Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a href="Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Classes/CentralManager.html">CentralManager</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/Characteristic.html">Characteristic</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/Descriptor.html">Descriptor</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/Peripheral.html">Peripheral</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/PeripheralManager.html">PeripheralManager</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/RxBluetoothKitLog.html">RxBluetoothKitLog</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/RxBluetoothKitLog/LogLevel.html">– LogLevel</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/ScannedPeripheral.html">ScannedPeripheral</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/Service.html">Service</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="Enums.html">Enumerations</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Enums/BluetoothError.html">BluetoothError</a>
              </li>
              <li class="nav-group-task">
                <a href="Enums/BluetoothState.html">BluetoothState</a>
              </li>
              <li class="nav-group-task">
                <a href="Enums/RxBluetoothKitLogger.html">RxBluetoothKitLogger</a>
              </li>
              <li class="nav-group-task">
                <a href="Enums/StartAdvertisingResult.html">StartAdvertisingResult</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="Extensions.html">Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Extensions/Reactive.html">Reactive</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="Functions.html">Functions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Functions.html#/s:14RxBluetoothKit2eeoiySbAA0B5ErrorO_ADtF">==(_:_:)</a>
              </li>
              <li class="nav-group-task">
                <a href="Functions.html#/s:14RxBluetoothKit2eeoiySbAA10DescriptorC_ADtF">==(_:_:)</a>
              </li>
              <li class="nav-group-task">
                <a href="Functions.html#/s:14RxBluetoothKit2eeoiySbAA10PeripheralC_ADtF">==(_:_:)</a>
              </li>
              <li class="nav-group-task">
                <a href="Functions.html#/s:14RxBluetoothKit2eeoiySbAA14CharacteristicC_ADtF">==(_:_:)</a>
              </li>
              <li class="nav-group-task">
                <a href="Functions.html#/s:14RxBluetoothKit2eeoiySbAA7ServiceC_ADtF">==(_:_:)</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Protocols/CharacteristicIdentifier.html">CharacteristicIdentifier</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/DescriptorIdentifier.html">DescriptorIdentifier</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/Logger.html">Logger</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/ManagerType.html">ManagerType</a>
              </li>
              <li class="nav-group-task">
                <a href="Protocols/ServiceIdentifier.html">ServiceIdentifier</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="Structs.html">Structures</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Structs/AdvertisementData.html">AdvertisementData</a>
              </li>
              <li class="nav-group-task">
                <a href="Structs/CentralManagerRestoredState.html">CentralManagerRestoredState</a>
              </li>
              <li class="nav-group-task">
                <a href="Structs/PeripheralManagerRestoredState.html">PeripheralManagerRestoredState</a>
              </li>
              <li class="nav-group-task">
                <a href="Structs/RestoredState.html">RestoredState</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="Typealiases.html">Type Aliases</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:14RxBluetoothKit19DisconnectionReasona">DisconnectionReason</a>
              </li>
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:14RxBluetoothKit32OnWillRestoreCentralManagerStatea">OnWillRestoreCentralManagerState</a>
              </li>
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:14RxBluetoothKit35OnWillRestorePeripheralManagerStatea">OnWillRestorePeripheralManagerState</a>
              </li>
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:14RxBluetoothKit18OnWillRestoreStatea">OnWillRestoreState</a>
              </li>
              <li class="nav-group-task">
                <a href="Typealiases.html#/s:14RxBluetoothKit25RestoredAdvertisementDataa">RestoredAdvertisementData</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            <h1>Protocols</h1>
            <p>The following protocols are available globally.</p>

          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:14RxBluetoothKit17ServiceIdentifierP"></a>
                    <a name="//apple_ref/swift/Protocol/ServiceIdentifier" class="dashAnchor"></a>
                    <a class="token" href="#/s:14RxBluetoothKit17ServiceIdentifierP">ServiceIdentifier</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>ServiceIdentifier protocol specifies how information about services of device should look like.
Sample implementation could look like:</p>
<pre class="highlight swift"><code><span class="kd">enum</span> <span class="kt">DeviceService</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="kt">ServiceIdentifier</span> <span class="p">{</span>
    <span class="k">case</span> <span class="n">deviceInformation</span> <span class="o">=</span> <span class="s">"180A"</span>
    <span class="k">var</span> <span class="nv">uuid</span><span class="p">:</span> <span class="kt">CBUUID</span> <span class="p">{</span>
        <span class="k">return</span> <span class="kt">CBUUID</span><span class="p">(</span><span class="nv">string</span><span class="p">:</span> <span class="k">self</span><span class="o">.</span><span class="n">rawValue</span><span class="p">)</span>
    <span class="p">}</span>
<span class="p">}</span>
</code></pre>

<p>After implementing this and other protocol `CharacteristicIdentifier, you could call methods even easier
thanks to convenience methods in library. This methods do all of the heavy lifting like discovering services, taking
them from cache etc. for you. We really recommend you to use it.</p>

                        <a href="Protocols/ServiceIdentifier.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">ServiceIdentifier</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/Polidea/RxBluetoothKit/tree/7.0.0/Source/DeviceIdentifiers.swift#L17-L20">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:14RxBluetoothKit24CharacteristicIdentifierP"></a>
                    <a name="//apple_ref/swift/Protocol/CharacteristicIdentifier" class="dashAnchor"></a>
                    <a class="token" href="#/s:14RxBluetoothKit24CharacteristicIdentifierP">CharacteristicIdentifier</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Characteristic protocol specifies how information about characteristics of device should look like.
Sample implementation could look like:</p>
<pre class="highlight swift"><code><span class="kd">enum</span> <span class="kt">DeviceCharacteristic</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="kt">CharacteristicIdentifier</span> <span class="p">{</span>
    <span class="k">case</span> <span class="n">manufacturerName</span> <span class="o">=</span> <span class="s">"2A29"</span>
    <span class="k">var</span> <span class="nv">uuid</span><span class="p">:</span> <span class="kt">CBUUID</span> <span class="p">{</span>
        <span class="k">return</span> <span class="kt">CBUUID</span><span class="p">(</span><span class="nv">string</span><span class="p">:</span> <span class="k">self</span><span class="o">.</span><span class="n">rawValue</span><span class="p">)</span>
    <span class="p">}</span>
    <span class="k">var</span> <span class="nv">service</span><span class="p">:</span> <span class="kt">ServiceIdentifier</span> <span class="p">{</span>
        <span class="k">switch</span> <span class="k">self</span> <span class="p">{</span>
        <span class="k">case</span> <span class="o">.</span><span class="kt">ManufacturerName</span><span class="p">:</span>
            <span class="k">return</span> <span class="kt">XXXService</span><span class="o">.</span><span class="kt">DeviceInformation</span>
        <span class="p">}</span>
    <span class="p">}</span>
<span class="p">}</span>
</code></pre>

                        <a href="Protocols/CharacteristicIdentifier.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">CharacteristicIdentifier</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/Polidea/RxBluetoothKit/tree/7.0.0/Source/DeviceIdentifiers.swift#L38-L43">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:14RxBluetoothKit20DescriptorIdentifierP"></a>
                    <a name="//apple_ref/swift/Protocol/DescriptorIdentifier" class="dashAnchor"></a>
                    <a class="token" href="#/s:14RxBluetoothKit20DescriptorIdentifierP">DescriptorIdentifier</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>DescriptorIdentifier protocol specifies how information about descriptors of device should look like.</p>

                        <a href="Protocols/DescriptorIdentifier.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">DescriptorIdentifier</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/Polidea/RxBluetoothKit/tree/7.0.0/Source/DeviceIdentifiers.swift#L46-L51">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:14RxBluetoothKit6LoggerP"></a>
                    <a name="//apple_ref/swift/Protocol/Logger" class="dashAnchor"></a>
                    <a class="token" href="#/s:14RxBluetoothKit6LoggerP">Logger</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Simple logging interface.</p>

<p>An application that wants RxBluetoothKit to use its logging solution will
need to provide a type that conforms to this signature and assign it to
<code><a href="Enums/RxBluetoothKitLogger.html#/s:14RxBluetoothKit0abC6LoggerO07defaultD0AA0D0_pvpZ">RxBluetoothKitLogger.defaultLogger</a></code>.</p>

                        <a href="Protocols/Logger.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">Logger</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/Polidea/RxBluetoothKit/tree/7.0.0/Source/Logger.swift#L6-L54">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:14RxBluetoothKit11ManagerTypeP"></a>
                    <a name="//apple_ref/swift/Protocol/ManagerType" class="dashAnchor"></a>
                    <a class="token" href="#/s:14RxBluetoothKit11ManagerTypeP">ManagerType</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Undocumented</p>

                        <a href="Protocols/ManagerType.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">ManagerType</span> <span class="p">:</span> <span class="kt">AnyObject</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/Polidea/RxBluetoothKit/tree/7.0.0/Source/ManagerType.swift#L5-L25">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </section>
        </section>
        <section id="footer">
          <p>&copy; 2021 <a class="link" href="https://polidea.com" target="_blank" rel="external">Polidea</a>. All rights reserved. (Last updated: 2021-02-10)</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</div>
</html>
